import { defineStore } from "pinia";
import {ref} from "vue";

// 组合式的
export const usePeopleStore2 = defineStore('people2', ()=>{
  let age = ref(27)
  let name = ref('小红')

  function setPeopleInfo(n,a){
    name.value = n;
    age.value = a;
  }

  function setPeopleInfoObj(people){
    name.value = people.name;
    age.value = people.age;
  }
  return {
    age,name,setPeopleInfo,setPeopleInfoObj
  }
})

